<style lang="scss" scoped>
.under-construction {
    text-align: center;
    font-size: 2em;
    color: tomato;
    padding-top: 100px;
}
</style>
<template lang="pug">
    .under-construction
        div 【{{title}}】
</template>

<script>
import { routesAll } from '@router'

export default {
    name: 'under-construction',
    data() {
        return {
            title: '开发中',
        }
    },
    methods: {
        hasRoute() {
            const path = this.$route.path
            if (path === '/403') {
                return true
            }
            const d = routesAll.find(v => {
                return v.path === path
            })
            return !!d
        },
    },
    mounted() {
        this.hasRoute() ? (this.title = '无权限，请联系管理员') : (this.title = '开发中')
    },
}
</script>
